stubdom/vtpm: make state save operation atomic
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>
Thu, 21 Mar 2013 20:11:25 +0000 (16:11 -0400)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 12 Apr 2013 13:28:17 +0000 (14:28 +0100)
commit58c2ab7588c4d27ac569494ae4ec8e81795d0ca3
tree470f15a329a86c5faeb19f0b98bacf4f75ce2628
parent57c265546e7d12d2f44225928c6b5679ad0a14ba
stubdom/vtpm: make state save operation atomic

This changes the save format of the vtpm stubdom to include two copies
of the saved data: one active, and one inactive. When saving the state,
data is written to the inactive slot before updating the key and hash
saved with the TPM Manager, which determines the active slot when the
vTPM starts up.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
stubdom/vtpm/vtpmblk.c